package othello.model;

public class Action {
    private final int row;
    private final int col;
    private double qvalue;

    public Action(int row, int col) {
        this.row = row;
        this.col = col;
    }
    
    public int getRow() {
    	return this.row;
    }
    
    public int getCol() {
    	return this.col;
    }
    
    public double getQValue() {
    	return this.qvalue;
    }
    
    public void setQValue(double qvalue) {
    	this.qvalue = qvalue;
    }
    
    @Override
	public boolean equals(Object obj) {
		boolean equals = true;
		if (!(obj instanceof Action)) {
			equals = false;
		} else {
			Action action = (Action) obj;
			equals = action.col == this.col && action.row == this.row;
		}
		return equals;
	}
	
	@Override
	public int hashCode() {
		return this.col * this.row;
	}
}
